700 |
Is it possible to colour a particular column for specified values
Gantt1->BeginUpdate(); Exganttlib_tlb::IConditionalFormatPtr var_ConditionalFormat = Gantt1->ConditionalFormats->Add(L"int(%1) in (3,4,5)",TNoParam()); var_ConditionalFormat->BackColor = RGB(255,0,0); var_ConditionalFormat->ApplyTo = Exganttlib_tlb::FormatApplyToEnum(0x1); Gantt1->MarkSearchColumn = false; Exganttlib_tlb::IColumnsPtr var_Columns = Gantt1->Columns; var_Columns->Add(L"Column 1"); var_Columns->Add(L"Column 2"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant(0))),TVariant(1),TVariant(1)); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant(2))),TVariant(1),TVariant(3)); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant(4))),TVariant(1),TVariant(5)); Gantt1->EndUpdate(); |
699 |
Is it possible to colour a particular column
Gantt1->BeginUpdate(); Gantt1->MarkSearchColumn = false; Exganttlib_tlb::IColumnsPtr var_Columns = Gantt1->Columns; var_Columns->Add(L"Column 1"); var_Columns->Add(L"Column 2")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellBackColor,TVariant(255)); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant(0))),TVariant(1),TVariant(1)); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant(2))),TVariant(1),TVariant(3)); var_Items->set_CellCaption(TVariant(var_Items->AddItem(TVariant(4))),TVariant(1),TVariant(5)); Gantt1->EndUpdate(); |
698 |
How do i get all the children items that are under a certain parent Item handle
Gantt1->BeginUpdate(); Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot; Gantt1->Columns->Add(L"P"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(h,true); Exganttlib_tlb::IItemsPtr var_Items1 = Gantt1->Items; long hChild = var_Items1->get_ItemChild(var_Items1->FirstVisibleItem); OutputDebugString( PChar(var_Items1->get_CellCaption(TVariant(hChild),TVariant(0))) ); OutputDebugString( PChar(var_Items1->get_CellCaption(TVariant(var_Items1->get_NextSiblingItem(hChild)),TVariant(0))) ); Gantt1->EndUpdate(); |
697 |
How can I change the predefined labels being displayed in the chart's header so it shows the data in short format with no literals
Gantt1->BeginUpdate(); Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->LevelCount = 3; var_Chart->OverviewVisible = Exganttlib_tlb::OverviewVisibleEnum::exOverviewShowAll; var_Chart->AllowOverviewZoom = Exganttlib_tlb::OverviewZoomEnum::exAlwaysZoom; var_Chart->set_Label(Exganttlib_tlb::UnitEnum::exYear,L"<%yy%><|><%yyyy%>"); var_Chart->set_Label(Exganttlib_tlb::UnitEnum::exHalfYear,L""); var_Chart->set_Label(Exganttlib_tlb::UnitEnum::exQuarterYear,L""); var_Chart->set_Label(Exganttlib_tlb::UnitEnum::exMonth,L"<|><%m%><|><%m%>/<%yy%><|><%m%>/<%yyyy%>"); var_Chart->set_Label(Exganttlib_tlb::UnitEnum::exThirdMonth,L""); var_Chart->set_Label(Exganttlib_tlb::UnitEnum::exWeek,L"<|><%ww%><|><%m%>/<%d%>/<%yy%><r><%ww%><|><%m%>/<%d%>/<%yyyy%><r><%ww%><||><||>256"); var_Chart->set_Label(Exganttlib_tlb::UnitEnum::exDay,L"<|><%d%><|><%m%>/<%d%>/<%yy%><|><%m%>/<%d%>/<%yyyy%><||><||>4096"); var_Chart->set_Label(Exganttlib_tlb::UnitEnum::exHour,L"<|><%hh%><|><%m%>/<%d%>/<%yy%> <%h%> <%AM/PM%><|><%m%>/<%d%>/<%yyyy%> <%h%> <%AM/PM%><||><||>65536"); var_Chart->set_Label(Exganttlib_tlb::UnitEnum::exMinute,L"<|><%nn%><|><%h%>:<%nn% <%AM/PM%>><|><%m%>/<%d%>/<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%m%>/<%d%>/<%yyyy%> <%h%>:<%nn%> <%AM/PM%>"); var_Chart->set_Label(Exganttlib_tlb::UnitEnum::exSecond,TVariant(String("<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%m%>/<%d%>/<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%m%>/<%d%>/<%yy") + "yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>")); var_Chart->set_LabelToolTip(Exganttlib_tlb::UnitEnum::exYear,L"<%yyyy%>"); var_Chart->set_LabelToolTip(Exganttlib_tlb::UnitEnum::exHalfYear,L""); var_Chart->set_LabelToolTip(Exganttlib_tlb::UnitEnum::exQuarterYear,L""); var_Chart->set_LabelToolTip(Exganttlib_tlb::UnitEnum::exMonth,L"<%m%>/<%yyyy%>"); var_Chart->set_LabelToolTip(Exganttlib_tlb::UnitEnum::exThirdMonth,L""); var_Chart->set_LabelToolTip(Exganttlib_tlb::UnitEnum::exWeek,L"<%m%>/<%d%>/<%yyyy%> <%ww%>"); var_Chart->set_LabelToolTip(Exganttlib_tlb::UnitEnum::exDay,L"<%m%>/<%d%>/<%yyyy%>"); var_Chart->set_LabelToolTip(Exganttlib_tlb::UnitEnum::exHour,L"<%m%>/<%d%>/<%yyyy%> <%h%> <%AM/PM%>"); var_Chart->set_LabelToolTip(Exganttlib_tlb::UnitEnum::exMinute,L"<%m%>/<%d%>/<%yyyy%> <%h%>:<%nn%> <%AM/PM%>"); var_Chart->set_LabelToolTip(Exganttlib_tlb::UnitEnum::exSecond,L"<%m%>/<%d%>/<%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>"); var_Chart->UnitScale = Exganttlib_tlb::UnitEnum::exDay; Gantt1->EndUpdate(); |
696 |
How can I get the caption of focused item
// SelectionChanged event - Fired after a new item has been selected. void __fastcall TForm1::Gantt1SelectionChanged(TObject *Sender) { Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; OutputDebugString( L"Handle" ); OutputDebugString( PChar(var_Items->FocusItem) ); OutputDebugString( L"Caption" ); OutputDebugString( PChar(var_Items->get_CellCaption(TVariant(var_Items->FocusItem),TVariant(0))) ); } Gantt1->BeginUpdate(); Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot; Gantt1->Columns->Add(L"Items"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("R2")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.2")); var_Items->set_ExpandItem(h,true); Gantt1->EndUpdate(); |
695 |
How can I get the caption of selected item
// SelectionChanged event - Fired after a new item has been selected. void __fastcall TForm1::Gantt1SelectionChanged(TObject *Sender) { Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; OutputDebugString( L"Handle" ); OutputDebugString( PChar(var_Items->get_SelectedItem(0)) ); OutputDebugString( L"Caption" ); OutputDebugString( PChar(var_Items->get_CellCaption(TVariant(var_Items->get_SelectedItem(0)),TVariant(0))) ); } Gantt1->BeginUpdate(); Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot; Gantt1->Columns->Add(L"Items"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("R2")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.2")); var_Items->set_ExpandItem(h,true); Gantt1->EndUpdate(); |
694 |
How can I highligth the item from the cursor as it moves
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::Gantt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { Gantt1->BeginUpdate(); long h = Gantt1->ItemFromPoint[-1,-1,c,hit]; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->ClearItemBackColor(Gantt1->get_Background(Exganttlib_tlb::BackgroundPartEnum(0x200 | Exganttlib_tlb::BackgroundPartEnum::exHSRight | Exganttlib_tlb::BackgroundPartEnum::exListOLEDropPosition))); var_Items->set_ItemBackColor(h,RGB(240,250,240)); Gantt1->Background[Exganttlib_tlb::BackgroundPartEnum(0x200 | Exganttlib_tlb::BackgroundPartEnum::exHSRight | Exganttlib_tlb::BackgroundPartEnum::exListOLEDropPosition)] = h; Gantt1->EndUpdate(); } Gantt1->BeginUpdate(); Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot; Gantt1->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exHLines; Gantt1->SelBackColor = RGB(240,250,240); Gantt1->SelForeColor = RGB(0,0,0); Gantt1->ShowFocusRect = false; Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->SelBackColor = RGB(240,250,240); Gantt1->Columns->Add(L"Items"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("R2")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.2")); var_Items->set_ExpandItem(h,true); Gantt1->EndUpdate(); |
693 |
How can I get the item from the cursor
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::Gantt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { long h = Gantt1->ItemFromPoint[-1,-1,c,hit]; OutputDebugString( L"Handle" ); OutputDebugString( L"h" ); OutputDebugString( L"Index" ); OutputDebugString( PChar(Gantt1->Items->get_ItemToIndex(h)) ); } Gantt1->BeginUpdate(); Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot; Gantt1->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exHLines; Gantt1->Columns->Add(L"Items"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("R2")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.2")); var_Items->set_ExpandItem(h,true); Gantt1->EndUpdate(); |
692 |
How can I get the column from the cursor, not only in the header
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::Gantt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { OutputDebugString( PChar(Gantt1->ColumnFromPoint[-1,0]) ); } Gantt1->BeginUpdate(); Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot; Gantt1->Columns->Add(L"P1"); Gantt1->Columns->Add(L"P2"); Gantt1->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("R2")); var_Items->set_CellCaption(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.1"))),TVariant(1),TVariant("Cell 1.2")); var_Items->set_CellCaption(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.1"))),TVariant(1),TVariant("Cell 2.2")); var_Items->set_ExpandItem(h,true); Gantt1->EndUpdate(); |
691 |
How can I get the column from the cursor
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::Gantt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { OutputDebugString( PChar(Gantt1->ColumnFromPoint[-1,-1]) ); } Gantt1->BeginUpdate(); Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot; Gantt1->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines; Gantt1->Columns->Add(L"P1"); Gantt1->Columns->Add(L"P2"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("R2")); var_Items->set_CellCaption(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.1"))),TVariant(1),TVariant("Cell 1.2")); var_Items->set_CellCaption(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.1"))),TVariant(1),TVariant("Cell 2.2")); var_Items->set_ExpandItem(h,true); Gantt1->EndUpdate(); |
690 |
How can I get the cell's caption from the cursor
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::Gantt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { long h = Gantt1->ItemFromPoint[-1,-1,c,hit]; OutputDebugString( PChar(Gantt1->Items->get_CellCaption(TVariant(h),TVariant(c))) ); } Gantt1->BeginUpdate(); Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot; Gantt1->Columns->Add(L"Items"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("R2")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.2")); var_Items->set_ExpandItem(h,true); Gantt1->EndUpdate(); |
689 |
Is it possible to change the style for the vertical or horizontal grid lines, in the list area
Gantt1->BeginUpdate(); Gantt1->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines; Gantt1->GridLineStyle = Exganttlib_tlb::GridLinesStyleEnum::exGridLinesVSolid | Exganttlib_tlb::GridLinesStyleEnum::exGridLinesHDot4; Gantt1->Columns->Add(L"C1"); Gantt1->Columns->Add(L"C2"); Gantt1->Columns->Add(L"C3"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Item 1")); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("SubItem 1.2")); var_Items->set_CellCaption(TVariant(h),TVariant(2),TVariant("SubItem 1.3")); h = var_Items->AddItem(TVariant("Item 2")); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant("SubItem 2.2")); var_Items->set_CellCaption(TVariant(h),TVariant(2),TVariant("SubItem 2.3")); Gantt1->EndUpdate(); |
688 |
How can I show the bars over the grid lines, i.e. so you cannot see the grid lines 'through' the bar
Gantt1->BeginUpdate(); Gantt1->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines; Gantt1->GridLineColor = RGB(220,220,220); Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines; var_Chart->GridLineStyle = Exganttlib_tlb::GridLinesStyleEnum::exGridLinesBehind; var_Chart->LevelCount = 2; Exganttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(1); var_Level->DrawGridLines = true; var_Level->GridLineColor = RGB(220,220,220); Exganttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task")); var_Bar->Pattern = Exganttlib_tlb::PatternEnum::exPatternSolid; var_Bar->Height = 14; Gantt1->Columns->Add(L"Column"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Item 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("A"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("B"),TNoParam()); Gantt1->EndUpdate(); |
687 |
Is it possible to change the style for the vertical grid lines, in the chart area only
Gantt1->BeginUpdate(); Gantt1->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines; Gantt1->GridLineStyle = Exganttlib_tlb::GridLinesStyleEnum::exGridLinesDash; Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines; var_Chart->GridLineStyle = Exganttlib_tlb::GridLinesStyleEnum::exGridLinesDash; var_Chart->LevelCount = 2; var_Chart->get_Level(1)->DrawGridLines = true; Exganttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->GridLineColor = RGB(255,0,0); var_Level->GridLineStyle = Exganttlib_tlb::GridLinesStyleEnum::exGridLinesVSolid; var_Chart->Bars->get_Item(TVariant("Task"))->Pattern = Exganttlib_tlb::PatternEnum::exPatternSolid; Gantt1->Columns->Add(L"Column"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Item 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("A"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("B"),TNoParam()); Gantt1->EndUpdate(); |
686 |
Is it possible to change the style for the grid lines, for instance to be solid not dotted
Gantt1->BeginUpdate(); Gantt1->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines; Gantt1->GridLineStyle = Exganttlib_tlb::GridLinesStyleEnum::exGridLinesSolid; Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines; var_Chart->GridLineStyle = Exganttlib_tlb::GridLinesStyleEnum::exGridLinesSolid; var_Chart->LevelCount = 2; var_Chart->get_Level(1)->DrawGridLines = true; var_Chart->Bars->get_Item(TVariant("Task"))->Pattern = Exganttlib_tlb::PatternEnum::exPatternSolid; Gantt1->Columns->Add(L"Column"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Item 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("A"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("B"),TNoParam()); Gantt1->EndUpdate(); |
685 |
How can I show the grid lines for the chart and list area
Gantt1->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines; Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->DrawGridLines = Exganttlib_tlb::GridLinesEnum::exAllLines; var_Chart->LevelCount = 2; var_Chart->get_Level(1)->DrawGridLines = true; var_Chart->Bars->get_Item(TVariant("Task"))->Pattern = Exganttlib_tlb::PatternEnum::exPatternSolid; Gantt1->Columns->Add(L"Column"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Item 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("A"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("B"),TNoParam()); |
684 |
How can I get the link from the point
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::Gantt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { OutputDebugString( PChar(Gantt1->Chart->get_LinkFromPoint(-1,-1)) ); } Gantt1->BeginUpdate(); Gantt1->Columns->Add(L"Task"); Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,29).operator double())); var_Chart->set_PaneWidth(false,64); var_Chart->LevelCount = 2; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); var_Items->set_Link(TVariant("L1"),Exganttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("L1")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->set_Link(TVariant("L2"),Exganttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("L2")); Gantt1->EndUpdate(); |
683 |
How can I get the bar from the point
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::Gantt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { OutputDebugString( PChar(Gantt1->Chart->get_BarFromPoint(-1,-1)) ); } Gantt1->BeginUpdate(); Gantt1->Columns->Add(L"Task"); Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,29).operator double())); var_Chart->set_PaneWidth(false,64); var_Chart->LevelCount = 2; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); Gantt1->EndUpdate(); |
682 |
How can I get the level from the cursor
|
681 |
I display numbers in my chart, but the AddBar requires a date how can I add a bar
Gantt1->BeginUpdate(); Gantt1->Columns->Add(L"Tasks"); Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->NonworkingDays = 0; var_Chart->set_FirstVisibleDate(TVariant(0)); var_Chart->ToolTip = L""; Exganttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%i%>")); var_Level->set_ToolTip(TVariant("")); var_Chart->UnitWidth = 24; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(2),TVariant(4),TNoParam(),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(6),TVariant(10),TNoParam(),TNoParam()); Gantt1->EndUpdate(); |
680 |
I display numbers in the chart's header but do not want to get displayed negative numbers. How can i do that
// DateChange event - Occurs when the first visible date is changed. void __fastcall TForm1::Gantt1DateChange(TObject *Sender) { Gantt1->Chart->set_FirstVisibleDate(TVariant(0)); Gantt1->ScrollPartEnable[Exganttlib_tlb::ScrollBarEnum::exHChartScroll,Exganttlib_tlb::ScrollPartEnum::exLeftBPart] = false; } Gantt1->BeginUpdate(); Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->NonworkingDays = 0; var_Chart->set_FirstVisibleDate(TVariant(0)); var_Chart->ToolTip = L""; Exganttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%i%>")); var_Level->set_ToolTip(TVariant("<%i%>")); var_Chart->UnitWidth = 24; Gantt1->EndUpdate(); |
679 |
How can I display numbers in the chart's header instead dates
Gantt1->BeginUpdate(); Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->NonworkingDays = 0; var_Chart->set_FirstVisibleDate(TVariant(0)); var_Chart->ToolTip = L""; Exganttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%i%>")); var_Level->set_ToolTip(TVariant("")); var_Chart->UnitWidth = 24; Gantt1->EndUpdate(); |
678 |
How can I determine that a certain bar is the topmost
Gantt1->Columns->Add(L"Task"); Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,27).operator double())); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Bars A B")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("B"),TNoParam()); var_Items->set_ItemBar(h,TVariant("B"),Exganttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255)); h = var_Items->AddItem(TVariant("Bars B A")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("B"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam()); var_Items->set_ItemBar(h,TVariant("A"),Exganttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255)); |
677 |
Is there any automatic way to change a property for all bars in the chart
Gantt1->Columns->Add(L"Task"); Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K3"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K4"),TNoParam()); var_Items->set_ItemBar(0,TVariant("<*>"),Exganttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255)); |
676 |
I have an EBN file how can I apply different colors to it, so no need to create a new one
Gantt1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn")); Gantt1->SelBackColor = Gantt1->BackColor; Gantt1->SelForeColor = Gantt1->ForeColor; Gantt1->HasLines = Exganttlib_tlb::HierarchyLineEnum::exNoLine; Gantt1->Columns->Add(L"Default"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); long hC = var_Items->InsertItem(h,TNoParam(),TVariant("Default")); var_Items->set_ItemBackColor(hC,0x1000000); var_Items->set_ItemHeight(var_Items->InsertItem(h,TNoParam(),TVariant("")),6); hC = var_Items->InsertItem(h,TNoParam(),TVariant("Light Green")); var_Items->set_ItemBackColor(hC,0x100ff00); var_Items->set_ItemHeight(var_Items->InsertItem(h,TNoParam(),TVariant("")),6); hC = var_Items->InsertItem(h,TNoParam(),TVariant("Dark Green")); var_Items->set_ItemBackColor(hC,0x1007f00); var_Items->set_ItemHeight(var_Items->InsertItem(h,TNoParam(),TVariant("")),6); hC = var_Items->InsertItem(h,TNoParam(),TVariant("Magenta")); var_Items->set_ItemBackColor(hC,0x1ff7fff); var_Items->set_ItemHeight(var_Items->InsertItem(h,TNoParam(),TVariant("")),6); hC = var_Items->InsertItem(h,TNoParam(),TVariant("Yellow")); var_Items->set_ItemBackColor(hC,0x17fffff); var_Items->set_ItemHeight(var_Items->InsertItem(h,TNoParam(),TVariant("")),6); var_Items->set_ExpandItem(h,true); |
675 |
How can I remove all bars from the chart
Gantt1->Columns->Add(L"Task"); Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam()); var_Items->ClearBars(0); |
674 |
How can I change the color for all bars with a specified key
Gantt1->Columns->Add(L"Task"); Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam()); var_Items->set_ItemBar(0,TVariant("K1"),Exganttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255)); |
673 |
Is there any automatic way to change a property for all bars with a specified key
Gantt1->Columns->Add(L"Task"); Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam()); var_Items->set_ItemBar(0,TVariant("K1"),Exganttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255)); |
672 |
How can I remove all bars with specified key
Gantt1->Columns->Add(L"Task"); Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam()); var_Items->RemoveBar(0,TVariant("K1")); |
671 |
Is there any option to show gradient bars without using EBN technology
Gantt1->Columns->Add(L"Task"); Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exganttlib_tlb::IBarPtr var_Bar = Gantt1->Chart->Bars->get_Item(TVariant("Task")); var_Bar->Color = RGB(255,0,0); var_Bar->StartColor = RGB(0,255,0); var_Bar->EndColor = RGB(255,255,0); var_Bar->Pattern = Exganttlib_tlb::PatternEnum::exPatternBox; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Task")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant(""),TNoParam()); |
670 |
How can I disable the control's splitter so the user can't resize the list area
|
669 |
How can I disable the control's splitter so the user can't resize the chart area
|
668 |
How can I define a bar that shows two colors, one up and one down, without using skin or EBN files
Gantt1->BeginUpdate(); Gantt1->Columns->Add(L"Task"); Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exganttlib_tlb::IBarPtr var_Bar = Gantt1->Chart->Bars->Add(L"A"); var_Bar->Color = RGB(255,0,0); var_Bar->Shape = Exganttlib_tlb::ShapeBarEnum::exShapeSolidUp; var_Bar->Pattern = Exganttlib_tlb::PatternEnum::exPatternSolid; Exganttlib_tlb::IBarPtr var_Bar1 = Gantt1->Chart->Bars->Add(L"B"); var_Bar1->Color = RGB(128,0,0); var_Bar1->Shape = Exganttlib_tlb::ShapeBarEnum::exShapeSolidDown; var_Bar1->Pattern = Exganttlib_tlb::PatternEnum::exPatternSolid; Gantt1->Chart->Bars->Add(L"A%B")->Shortcut = L"AB"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("AB"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K1"),TNoParam()); var_Items->set_ItemBar(h,TVariant("K1"),Exganttlib_tlb::ItemBarPropertyEnum::exBarPercent,TVariant(1)); Gantt1->EndUpdate(); |
667 |
Does your control support RightToLeft property for RTL languages or right to left
Gantt1->BeginUpdate(); Gantt1->ScrollBars = Exganttlib_tlb::ScrollBarsEnum::exDisableBoth; Gantt1->LinesAtRoot = Exganttlib_tlb::LinesAtRootEnum::exLinesAtRoot; Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"P1"); var_Column->set_Def(Exganttlib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); var_Column->PartialCheck = true; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(h,true); Gantt1->RightToLeft = true; Gantt1->EndUpdate(); |
666 |
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right
|
665 |
Can I display the cell's check box after the text
Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Column"); var_Column->set_Def(Exganttlib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); var_Column->set_Def(Exganttlib_tlb::DefColumnEnum::exCellDrawPartsOrder,TVariant("caption,check")); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->set_CellHasCheckBox(TVariant(var_Items->AddItem(TVariant("Caption 1"))),TVariant(0),true); var_Items->set_CellHasCheckBox(TVariant(var_Items->AddItem(TVariant("Caption 2"))),TVariant(0),true); |
664 |
Can I change the order of the parts in the cell, as checkbox after the text, and so on
Gantt1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")); Gantt1->Columns->Add(L"Column")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellDrawPartsOrder,TVariant("caption,check,icon,icons,picture")); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Text")); var_Items->set_CellImage(TVariant(h),TVariant(0),1); var_Items->set_CellHasCheckBox(TVariant(h),TVariant(0),true); |
663 |
Can I have an image displayed after the text. Can I get that effect without using HTML content
Gantt1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")); Gantt1->Columns->Add(L"Column")->set_Def(Exganttlib_tlb::DefColumnEnum::exCellDrawPartsOrder,TVariant("caption,icon,check,icons,picture")); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Text")); var_Items->set_CellImage(TVariant(h),TVariant(0),1); |
662 |
Is there any option to print the columns section on each page
Gantt1->BeginUpdate(); Gantt1->Columns->Add(L"Col 1"); Gantt1->Columns->Add(L"Col 2"); Gantt1->MarkSearchColumn = false; Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Gantt1->Chart->LevelCount = 2; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h1 = var_Items->AddItem(TVariant("Col 1")); var_Items->set_CellCaption(TVariant(h1),TVariant(1),TVariant("Col 2")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Col 1")); var_Items->set_CellCaption(TVariant(h2),TVariant(1),TVariant("Col 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,2,5).operator double()),TVariant(TDateTime(2001,2,7).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); var_Items->set_Link(TVariant("L1"),Exganttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(0)); Gantt1->EndUpdate(); /* Select the Component\Import Component...\Import a Type Library, to import the following Type Library: ExPrint 1.0 Control Library TypeLib: ExPrint.dll to define the namespace: Exprintlib_tlb */ //#include "EXPRINTLIB_TLB.h" Exprintlib_tlb::IExPrintPtr var_Print = Variant::CreateObject(L"Exontrol.Print"); var_Print->set_Options(TVariant("ColumnsOnEveryPage=-2")); var_Print->PrintExt = (IUnknown*)Gantt1->DefaultDispatch; var_Print->Preview(); |
661 |
Is there any option to print the columns section on each page
Gantt1->BeginUpdate(); Gantt1->Columns->Add(L"Task"); Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Gantt1->Chart->LevelCount = 2; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,2,5).operator double()),TVariant(TDateTime(2001,2,7).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); var_Items->set_Link(TVariant("L1"),Exganttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(0)); Gantt1->EndUpdate(); /* Select the Component\Import Component...\Import a Type Library, to import the following Type Library: ExPrint 1.0 Control Library TypeLib: ExPrint.dll to define the namespace: Exprintlib_tlb */ //#include "EXPRINTLIB_TLB.h" Exprintlib_tlb::IExPrintPtr var_Print = Variant::CreateObject(L"Exontrol.Print"); var_Print->set_Options(TVariant("ColumnsOnEveryPage=1")); var_Print->PrintExt = (IUnknown*)Gantt1->DefaultDispatch; var_Print->Preview(); |
660 |
How do I print the control's content
Gantt1->BeginUpdate(); Gantt1->Columns->Add(L"Task"); Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); var_Items->set_Link(TVariant("L1"),Exganttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(0)); Gantt1->EndUpdate(); /* Select the Component\Import Component...\Import a Type Library, to import the following Type Library: ExPrint 1.0 Control Library TypeLib: ExPrint.dll to define the namespace: Exprintlib_tlb */ //#include "EXPRINTLIB_TLB.h" Exprintlib_tlb::IExPrintPtr var_Print = Variant::CreateObject(L"Exontrol.Print"); var_Print->PrintExt = (IUnknown*)Gantt1->DefaultDispatch; var_Print->Preview(); |
659 |
How can I display the column using currency format and enlarge the font for certain values
Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Currency"); var_Column->set_Def(Exganttlib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column->FormatColumn = L"len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant("1.23")); var_Items->AddItem(TVariant("2.34")); var_Items->AddItem(TVariant("9.94")); var_Items->AddItem(TVariant("11.94")); var_Items->AddItem(TVariant("1000")); |
658 |
How can I highlight only parts of the cells
Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L""); var_Column->set_Def(Exganttlib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column->FormatColumn = L"value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 3")); var_Items->set_ExpandItem(h,true); |
657 |
How can I get the number of occurrences of a specified string in the cell
Gantt1->Columns->Add(L""); Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"occurrences"); var_Column->ComputedField = L"lower(%0) count 'o'"; var_Column->FormatColumn = L"'contains ' + value + ' of \\'o\\' chars'"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1 oooof the root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 3")); var_Items->set_ExpandItem(h,true); |
656 |
How can I display dates in my format
Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Date"); var_Column->set_Def(Exganttlib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column->FormatColumn = L"'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,21).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,22).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,13).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,24).operator double())); |
655 |
How can I display dates in short format
Gantt1->Columns->Add(L"Date")->FormatColumn = L"shortdate(value)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,2).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,3).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,4).operator double())); |
654 |
How can I display dates in long format
Gantt1->Columns->Add(L"Date")->FormatColumn = L"longdate(value)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,2).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,3).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,4).operator double())); |
653 |
How can I display only the right part of the cell
Gantt1->Columns->Add(L""); Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Right"); var_Column->ComputedField = L"%0 right 2"; var_Column->FormatColumn = L"'\"' + value + '\"'"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->InsertItem(h,TNoParam(),TVariant("SChild 3")); var_Items->set_ExpandItem(h,true); |
652 |
How can I display only the left part of the cell
Gantt1->Columns->Add(L""); Gantt1->Columns->Add(L"Left")->ComputedField = L"%0 left 2"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->InsertItem(h,TNoParam(),TVariant("SChild 3")); var_Items->set_ExpandItem(h,true); |
651 |
How can I display true or false instead 0 and -1
Gantt1->Columns->Add(L"Boolean")->FormatColumn = L"value != 0 ? 'true' : 'false'"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(true)); var_Items->AddItem(TVariant(false)); var_Items->AddItem(TVariant(true)); var_Items->AddItem(TVariant(0)); var_Items->AddItem(TVariant(1)); |
650 |
How can I display icons or images instead numbers
Gantt1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")); Exganttlib_tlb::IColumnPtr var_Column = Gantt1->Columns->Add(L"Icons"); var_Column->set_Def(Exganttlib_tlb::DefColumnEnum::exCellCaptionFormat,TVariant(1)); var_Column->FormatColumn = L"'The cell displays the icon <img>'+value+'</img> instead ' + value"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(1)); var_Items->AddItem(TVariant(2)); var_Items->AddItem(TVariant(3)); |
649 |
How can I display the column using currency
Gantt1->Columns->Add(L"Currency")->FormatColumn = L"currency(dbl(value))"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant("1.23")); var_Items->AddItem(TVariant("2.34")); var_Items->AddItem(TVariant("0")); var_Items->AddItem(TVariant(5)); var_Items->AddItem(TVariant("10000.99")); |
648 |
How can I display the currency only for not empty cells
Gantt1->Columns->Add(L"Number"); Gantt1->Columns->Add(L"Currency")->ComputedField = L"len(%0) ? currency(dbl(%0)) : ''"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant("1.23")); var_Items->AddItem(TVariant("2.34")); var_Items->AddItem(TVariant("0")); var_Items->set_ItemBackColor(var_Items->AddItem(TNoParam()),RGB(255,128,128)); var_Items->AddItem(TVariant("10000.99")); |
647 |
Is there a function to display the number of days between two date including the number of hours
Gantt1->Columns->Add(L"Start")->Width = 32; Gantt1->Columns->Add(L"End"); Gantt1->Columns->Add(L"Duration")->ComputedField = TVariant(String("2:=((1:=int(0:= date(%1)-date(%0))) = 0 ? '' : str(=:1) + ' day(s)') + ( 3:=round(24*(=:0-floor(=:0))) ? (len(=:2) ? ' and ' : ") + "'') + =:3 + ' hour(s)' : '' )"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant(TDateTime(2001,1,11).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2001,1,14).operator double())); h = var_Items->AddItem(TVariant(TDateTime(2002,2,22,12,00,00,0).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2002,3,14,13,00,00,0).operator double())); h = var_Items->AddItem(TVariant(TDateTime(2003,3,13).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2003,4,11,11,00,00,0).operator double())); |
646 |
Is there a function to display the number of days between two date including the number of hours
Gantt1->Columns->Add(L"Start"); Gantt1->Columns->Add(L"End"); Gantt1->Columns->Add(L"Duration")->ComputedField = L"\"D \" + int(date(%1)-date(%0)) + \" H \" + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant(TDateTime(2001,1,11).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2001,1,14,23,00,00,0).operator double())); h = var_Items->AddItem(TVariant(TDateTime(2002,2,22,12,00,00,0).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2002,3,14,13,00,00,0).operator double())); h = var_Items->AddItem(TVariant(TDateTime(2003,3,13).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2003,4,11,11,00,00,0).operator double())); |
645 |
How can I display the number of days between two dates
Gantt1->Columns->Add(L"Start"); Gantt1->Columns->Add(L"End"); Gantt1->Columns->Add(L"Duration")->ComputedField = L"(date(%1)-date(%0)) + ' days'"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant(TDateTime(2001,1,11).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2001,1,14).operator double())); h = var_Items->AddItem(TVariant(TDateTime(2002,2,22).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2002,3,14).operator double())); h = var_Items->AddItem(TVariant(TDateTime(2003,3,13).operator double())); var_Items->set_CellCaption(TVariant(h),TVariant(1),TVariant(TDateTime(2003,4,11).operator double())); |
644 |
How can I get second part of the date
Gantt1->Columns->Add(L"Date"); Gantt1->Columns->Add(L"Second")->ComputedField = L"sec(date(%0))"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,11,10,10,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,22,11,01,22,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,13,12,23,01,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,14,13,11,59,0).operator double())); |
643 |
How can I get minute part of the date
Gantt1->Columns->Add(L"Date"); Gantt1->Columns->Add(L"Minute")->ComputedField = L"min(date(%0))"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,11,10,10,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,22,11,01,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,13,12,23,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,14,13,11,00,0).operator double())); |
642 |
How can I check the hour part only so I know it was afternoon
Gantt1->ConditionalFormats->Add(L"hour(%0)>=12",TNoParam())->Bold = true; Gantt1->Columns->Add(L"Date"); Gantt1->Columns->Add(L"Hour")->ComputedField = L"hour(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,11,10,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,22,11,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,13,12,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,14,13,00,00,0).operator double())); |
641 |
What about a function to get the day in the week, or days since Sunday
Gantt1->Columns->Add(L"Date"); Gantt1->Columns->Add(L"WeekDay")->ComputedField = L"weekday(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,11,10,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,22,11,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,13,12,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,14,13,00,00,0).operator double())); |
640 |
Is there any function to get the day of the year or number of days since January 1st
Gantt1->Columns->Add(L"Date"); Gantt1->Columns->Add(L"Day since January 1st")->ComputedField = L"yearday(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,11,10,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,22,11,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,13,12,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,14,13,00,00,0).operator double())); |
639 |
How can I display only the day of the date
Gantt1->Columns->Add(L"Date"); Gantt1->Columns->Add(L"Day")->ComputedField = L"day(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,11,10,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,22,11,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,13,12,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,14,13,00,00,0).operator double())); |
638 |
How can I display only the month of the date
Gantt1->Columns->Add(L"Date"); Gantt1->Columns->Add(L"Month")->ComputedField = L"month(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,1,10,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,2,11,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,3,12,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,4,13,00,00,0).operator double())); |
637 |
How can I get only the year part from a date expression
Gantt1->Columns->Add(L"Date"); Gantt1->Columns->Add(L"Year")->ComputedField = L"year(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,1,10,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,2,11,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,3,12,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,4,13,00,00,0).operator double())); |
636 |
Can I convert the expression to date
Gantt1->Columns->Add(L"Number"); Gantt1->Columns->Add(L"Date")->ComputedField = L"date(dbl(%0))"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant("-1.98")); var_Items->AddItem(TVariant("30000.99")); var_Items->AddItem(TVariant("3561.23")); var_Items->AddItem(TVariant("1232.34")); |
635 |
Can I convert the expression to a number, double or float
Gantt1->Columns->Add(L"Number"); Gantt1->Columns->Add(L"Number + 2")->ComputedField = L"dbl(%0)+2"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant("-1.98")); var_Items->AddItem(TVariant("0.99")); var_Items->AddItem(TVariant("1.23")); var_Items->AddItem(TVariant("2.34")); |
634 |
How can I display dates in long format
Gantt1->Columns->Add(L"Date"); Gantt1->Columns->Add(L"LongFormat")->ComputedField = L"longdate(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,1,10,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,2,11,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,3,12,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,4,13,00,00,0).operator double())); |
633 |
How can I display dates in short format
Gantt1->Columns->Add(L"Date"); Gantt1->Columns->Add(L"ShortFormat")->ComputedField = L"shortdate(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,1,10,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,2,11,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,3,12,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,4,13,00,00,0).operator double())); |
632 |
How can I display the time only of a date expression
Gantt1->Columns->Add(L"Date"); Gantt1->Columns->Add(L"Time")->ComputedField = L"'time is:' + time(date(%0))"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant(TDateTime(2001,1,1,10,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,2,2,11,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,3,3,12,00,00,0).operator double())); var_Items->AddItem(TVariant(TDateTime(2004,4,4,13,00,00,0).operator double())); |
631 |
Is there any function to display currencies, or money formatted as in the control panel
Gantt1->Columns->Add(L"Number"); Gantt1->Columns->Add(L"Currency")->ComputedField = L"currency(dbl(%0))"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant("1.23")); var_Items->AddItem(TVariant("2.34")); var_Items->AddItem(TVariant("10000.99")); |
630 |
How can I convert the expression to a string so I can look into the date string expression for month's name
Gantt1->Columns->Add(L"Number"); Gantt1->Columns->Add(L"Str")->ComputedField = L"str(%0) + ' AA'"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant("-1.98")); var_Items->AddItem(TVariant("0.99")); var_Items->AddItem(TVariant("1.23")); var_Items->AddItem(TVariant("2.34")); |
629 |
Can I display the absolute value or positive part of the number
Gantt1->Columns->Add(L"Number"); Gantt1->Columns->Add(L"Abs")->ComputedField = L"abs(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant("-1.98")); var_Items->AddItem(TVariant("0.99")); var_Items->AddItem(TVariant("1.23")); var_Items->AddItem(TVariant("2.34")); |
628 |
Is there any function to get largest number with no fraction part that is not greater than the value
Gantt1->Columns->Add(L"Number"); Gantt1->Columns->Add(L"Floor")->ComputedField = L"floor(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant("-1.98")); var_Items->AddItem(TVariant("0.99")); var_Items->AddItem(TVariant("1.23")); var_Items->AddItem(TVariant("2.34")); |
627 |
Is there any function to round the values base on the .5 value
Gantt1->Columns->Add(L"Number"); Gantt1->Columns->Add(L"Round")->ComputedField = L"round(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant("-1.98")); var_Items->AddItem(TVariant("0.99")); var_Items->AddItem(TVariant("1.23")); var_Items->AddItem(TVariant("2.34")); |
626 |
How can I get or display the integer part of the cell
Gantt1->Columns->Add(L"Number"); Gantt1->Columns->Add(L"Int")->ComputedField = L"int(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddItem(TVariant("-1.98")); var_Items->AddItem(TVariant("0.99")); var_Items->AddItem(TVariant("1.23")); var_Items->AddItem(TVariant("2.34")); |
625 |
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )
Gantt1->Columns->Add(L"")->ComputedField = L"proper(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("root")); var_Items->InsertItem(h,TNoParam(),TVariant("child child")); var_Items->InsertItem(h,TNoParam(),TVariant("child child")); var_Items->InsertItem(h,TNoParam(),TVariant("child child")); var_Items->set_ExpandItem(h,true); |
624 |
Is there any option to display cells in uppercase
Gantt1->Columns->Add(L"")->ComputedField = L"upper(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Chld 3")); var_Items->set_ExpandItem(h,true); |
623 |
Is there any option to display cells in lowercase
Gantt1->Columns->Add(L"")->ComputedField = L"lower(%0)"; Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Chld 3")); var_Items->set_ExpandItem(h,true); |
622 |
How can I mark the cells that has a specified type, ie strings only
Gantt1->ConditionalFormats->Add(L"type(%0) = 8",TNoParam())->ForeColor = RGB(255,0,0); Gantt1->Columns->Add(L""); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant(2)); var_Items->InsertItem(h,TNoParam(),TVariant("Chld 3")); var_Items->set_ExpandItem(h,true); |
621 |
How can I bold the items that contains data or those who displays empty strings
Gantt1->ConditionalFormats->Add(L"not len(%1)=0",TNoParam())->Bold = true; Gantt1->Columns->Add(L"C1"); Gantt1->Columns->Add(L"C2"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); long hC = var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_CellCaption(TVariant(hC),TVariant(1),TVariant("1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 3")); var_Items->set_ExpandItem(h,true); |
620 |
Can I change the background color for items or cells that contains a specified string
Gantt1->ConditionalFormats->Add(L"%0 contains 'hi'",TNoParam())->BackColor = RGB(255,0,0); Gantt1->Columns->Add(L""); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Chld 3")); var_Items->set_ExpandItem(h,true); |
619 |
Is there any option to change the fore color for cells or items that ends with a specified string
Gantt1->ConditionalFormats->Add(L"%0 endwith '22'",TNoParam())->ForeColor = RGB(255,0,0); Gantt1->Columns->Add(L""); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1.22")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2.22")); var_Items->set_ExpandItem(h,true); |
618 |
How can I highlight the cells or items that starts with a specified string
Gantt1->ConditionalFormats->Add(L"%0 startwith 'C'",TNoParam())->Underline = true; Gantt1->Columns->Add(L""); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->InsertItem(h,TNoParam(),TVariant("SChild 3")); var_Items->set_ExpandItem(h,true); |
617 |
How can I change the background color or the visual appearance using ebn for a particular column
Gantt1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn")); Exganttlib_tlb::IColumnsPtr var_Columns = Gantt1->Columns; var_Columns->Add(L"Column 1"); var_Columns->Add(L"Column 2")->set_Def(Exganttlib_tlb::DefColumnEnum::exHeaderBackColor,TVariant(16777216)); var_Columns->Add(L"Column 3")->set_Def(Exganttlib_tlb::DefColumnEnum::exHeaderBackColor,TVariant(16777471)); var_Columns->Add(L"Column 4"); |
616 |
How can I change the background color for a particular column
|
615 |
Is it possible to define level in terms of just increasing numbers (not a Date)
|
614 |
How can I hide the non-working units ( days or hours )
|
613 |
Is there a way to have the display show the word "Noon" instead "12:00 PM" in the chart's header/levels
|
612 |
How can I change the selection background color in the chart area
Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Gantt1->Chart->SelBackColor = RGB(255,0,0); Gantt1->Columns->Add(L"Column"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Item 1")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TNoParam(),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Item 1")),TVariant("Task"),TVariant(TDateTime(2001,1,6).operator double()),TVariant(TDateTime(2001,1,14).operator double()),TNoParam(),TNoParam()); var_Items->set_SelectItem(var_Items->FirstVisibleItem,true); |
611 |
How can I change the selection background color in the chart area
Gantt1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn")); Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Gantt1->Chart->SelBackColor = 0x1000000; Gantt1->Columns->Add(L"Column"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Item 1")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TNoParam(),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Item 1")),TVariant("Task"),TVariant(TDateTime(2001,1,6).operator double()),TVariant(TDateTime(2001,1,14).operator double()),TNoParam(),TNoParam()); var_Items->set_SelectItem(var_Items->FirstVisibleItem,true); |
610 |
Is there any way to extend the selection on the chart
Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Gantt1->Chart->SelBackColor = Gantt1->SelBackColor; Gantt1->Columns->Add(L"Column"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Item 1")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TNoParam(),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Item 1")),TVariant("Task"),TVariant(TDateTime(2001,1,6).operator double()),TVariant(TDateTime(2001,1,14).operator double()),TNoParam(),TNoParam()); var_Items->set_SelectItem(var_Items->FirstVisibleItem,true); |
609 |
How can I display the column's header using multiple lines
Gantt1->HeaderHeight = 128; Gantt1->HeaderSingleLine = false; Gantt1->Columns->Add(L"This is just a column that should break the header.")->Width = 32; Gantt1->Columns->Add(L"This is just another column that should break the header."); |
608 |
How can change the width, transparency, style, visual appearance ( EBN), of the vertical bar that shows the current date-time
Gantt1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn")); Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->LevelCount = 2; var_Chart->get_Level(0)->set_Label(TVariant(1048576)); Exganttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(1); var_Level->set_Label(TVariant("<%ss%>")); var_Level->Count = 15; var_Chart->MarkNowColor = 0x1000000; var_Chart->MarkNowWidth = 6; var_Chart->MarkNowTransparent = 50; Gantt1->Columns->Add(L"Tasks"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Item 1")),TVariant("Task"),TVariant(TDateTime(2008,1,1).operator double()),TVariant(TDateTime(2018,1,1).operator double()),TNoParam(),TNoParam()); |
607 |
How can change the width, style, visual appearance ( EBN), of the vertical bar that shows the current time
Gantt1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn")); Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->LevelCount = 2; var_Chart->get_Level(0)->set_Label(TVariant(1048576)); Exganttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(1); var_Level->set_Label(TVariant("<%ss%>")); var_Level->Count = 15; var_Chart->MarkNowColor = 0x1000000; var_Chart->MarkNowWidth = 6; Gantt1->Columns->Add(L"Tasks"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Item 1")),TVariant("Task"),TVariant(TDateTime(2008,1,1).operator double()),TVariant(TDateTime(2018,1,1).operator double()),TNoParam(),TNoParam()); |
606 |
How can I show a vertical bar that indicates the current time
Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->LevelCount = 2; var_Chart->get_Level(0)->set_Label(TVariant(1048576)); Exganttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(1); var_Level->set_Label(TVariant("<%ss%>")); var_Level->Count = 15; var_Chart->MarkNowColor = RGB(0,0,255); var_Chart->MarkNowWidth = 7; Gantt1->Columns->Add(L"Tasks"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Item 1")),TVariant("Task"),TVariant(TDateTime(2008,1,1).operator double()),TVariant(TDateTime(2018,1,1).operator double()),TNoParam(),TNoParam()); |
605 |
How can I show semi-transparent the vertical bar that indicates the current time
Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->LevelCount = 2; var_Chart->get_Level(0)->set_Label(TVariant(1048576)); Exganttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(1); var_Level->set_Label(TVariant("<%ss%>")); var_Level->Count = 15; var_Chart->MarkNowColor = RGB(0,0,255); var_Chart->MarkNowWidth = 7; var_Chart->MarkNowTransparent = 50; Gantt1->Columns->Add(L"Tasks"); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Item 1")),TVariant("Task"),TVariant(TDateTime(2008,1,1).operator double()),TVariant(TDateTime(2018,1,1).operator double()),TNoParam(),TNoParam()); |
604 |
Is there any way to highlight or show a vertical bar that indicates the current time, from 15 to 15 seconds
Gantt1->Chart->LevelCount = 2; Gantt1->Chart->get_Level(0)->set_Label(TVariant(1048576)); Exganttlib_tlb::ILevelPtr var_Level = Gantt1->Chart->get_Level(1); var_Level->set_Label(TVariant("<%ss%>")); var_Level->Count = 15; Gantt1->Chart->MarkNowColor = RGB(0,0,255); Gantt1->Chart->MarkNowCount = 15; Gantt1->Chart->MarkNowWidth = 3; |
603 |
Is there any way to highlight or show a vertical bar that indicates the current time, from minute to minute, hour and so on
Exganttlib_tlb::IChartPtr var_Chart = Gantt1->Chart; var_Chart->UnitWidth = 48; var_Chart->LevelCount = 1; var_Chart->get_Level(0)->set_Label(TVariant(1048576)); var_Chart->MarkNowColor = RGB(255,0,0); var_Chart->MarkNowUnit = Exganttlib_tlb::UnitEnum::exMinute; var_Chart->MarkNowWidth = var_Chart->UnitWidth; |
602 |
Is there any way to highlight or show a vertical bar that indicates the current time
Gantt1->Chart->LevelCount = 2; Gantt1->Chart->get_Level(0)->set_Label(TVariant(1048576)); Exganttlib_tlb::ILevelPtr var_Level = Gantt1->Chart->get_Level(1); var_Level->set_Label(TVariant("<%ss%>")); var_Level->Count = 15; Gantt1->Chart->MarkNowColor = RGB(255,0,0); |
601 |
Is there a way of making a bar flash on the screen
Gantt1->Columns->Add(L"Task"); Gantt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exganttlib_tlb::IItemsPtr var_Items = Gantt1->Items; long h = var_Items->AddItem(TVariant("Flashy task")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K1"),TNoParam()); var_Items->set_ItemBar(h,TVariant("K1"),Exganttlib_tlb::ItemBarPropertyEnum::exBarTransparent,TVariant(80)); |